﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Core.Xml.Ogc.Ows
{
    class UnNamedDomainType : IXmlType
    {
        public PossibleValues PossibleValues { get; set; }
        public DefaultValue DefaultValue { get; set; }
        public DomainMetaDataType Meaning { get; set; }
        public DomainMetaDataType DataType { get; set; }
        public ValuesUnit ValuesUnit { get; set; }

        //TODO : Implement ows:Metadata

        public XElement CreateXElement(XName elementName)
        {
            XElement unNamedDomainType = new XElement(elementName);

            unNamedDomainType.Add(PossibleValues.CreateXElement());
            unNamedDomainType.Add(DefaultValue.CreateXElement());
            unNamedDomainType.Add(Meaning.CreateXElement(Namespaces.OWS + "Meaning"));
            unNamedDomainType.Add(DataType.CreateXElement(Namespaces.OWS + "DataType"));
            unNamedDomainType.Add(ValuesUnit.CreateXElement());

            return unNamedDomainType;
        }
    }
}
